<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"> 

<h:head></h:head> 
<body> 

<h:form>
	<h:dataTable value="#{usuarioBean.buscaTodos}" var="usu"> 
		<h:column>
			<f:facet name="header">
				<h:outputText value="ID" />
			</f:facet>				
			<h:outputText value="#{usu.id}" />		
		</h:column>	
		
		<h:column>
			<f:facet name="header">
				<h:outputText value="Nome" />
			</f:facet>	
			
			<h:outputText value="#{usu.nome}" />
		
		</h:column>	
		
		<h:column>
		
			<f:facet name="header">
				<h:outputText value="Login" />
			</f:facet>	
			
			<h:outputText value="#{usu.login}" />
			
		
		</h:column>	
		
		<h:column>
			
			<f:facet name="header">
				<h:outputText value="Senha" />
			</f:facet>	
			
			<h:outputText value="#{usu.senha}" />
		
		</h:column>	
		
		<h:column>
			
			<f:facet name="header">
				<h:outputText value="Exluir" />
			</f:facet>	
			
			<h:commandButton value="Excluir" action="#{usuarioBean.excluir()}" />
		
		</h:column>	
		
		
		<h:column>
			
			<f:facet name="header">
				<h:outputText value="Alterar" />
			</f:facet>	
			
			<h:commandButton value="Alterar" action="#{usuarioBean.preparaAlterar()}" />
		
		</h:column>	
	</h:dataTable>


</h:form>

</body> 
</html>
